1
general::
Leave while one can or has the chance to, as in He just had a good offer from a rival firm and decided to get out while the getting is good. This colloquial phrase uses GET OUT in the sense of "escape" or "depart."
American Heritage Idioms